package DTaskLinkApp;
use 5.018;
use warnings;
use Mojo::Base 'Mojolicious';
sub startup
{
	my $self = shift;
	say "call startup $self";
	my $r = $self->routes;

	#PUT /link/bugzilla/178/gerrit/1230
	my $support_services = [qw(gerrit bugzilla tower_todo product_requirement design_image)];
	$r->put('/:target_a/:a_id/:target_b/:b_id' =>
		[ target_a => $support_services, target_b => $support_services ] )
		->to('link#linkWith');

	$r->delete('/:target_a/:a_id/:target_b/:b_id' =>
		[ target_a => $support_services, target_b => $support_services ] )
		->to('link#unlinkWith');

	#GET /link/bugzilla/1
	$r->get('/:target/:id' => [ target => $support_services] )
		->to('link#getAll');
	
}

1;

